<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  
  //call/apply
  function foo(name,age,height) {
    console.log("foo函数被调用：",this)
  }
  //()调用
  foo("why",18,1.88)//window
  //apply
  //第一个参数：绑定this
  //第二个参数：传入额外的实参，以数组的形式
  foo.apply("apply",["kobe",30,1.98])//String
  //call
  //第一个参数：绑定this
  //参数列表:后续的参数是以我们多参数来传递的，会作为我们的实参
  foo.call("call","james",25,2,2.05)

  
  </script>
</body>
</html>